package com.gitee.controller;

import com.gitee.service.ICookbookService;
import com.gitee.vo.CookbookVo;
import com.gitee.vo.ResponseVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/cookbook")
public class CookbookController {

    @Autowired
    private ICookbookService cookbookService;

    @GetMapping("/today")
    public ResponseVo<CookbookVo> today(Integer cookbookType) {
        CookbookVo cookbookVo = cookbookService.getTodayCookbook(cookbookType);
        return ResponseVo.ok(cookbookVo);
    }
}
